Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Fix Key Override includes #13831

Merged
merged 2 commits into from
Aug 1, 2021
Merged

Conversation

drashna
Copy link
Member

@drashna drashna commented Aug 1, 2021

Description

Include was wrong. Fixed.

Types of Changes

  • Core
  • Bugfix

Issues Fixed or Closed by This PR

  • Discord reported

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

@drashna drashna requested a review from a team August 1, 2021 04:08
@github-actions github-actions bot added the core label Aug 1, 2021
Copy link
Member

@zvecr zvecr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rather keep the includes the same, and just do the following,

diff --git a/quantum/process_keycode/process_key_override.c b/quantum/process_keycode/process_key_override.c
index 8b45a9404..09b272507 100644
--- a/quantum/process_keycode/process_key_override.c
+++ b/quantum/process_keycode/process_key_override.c
@@ -18,7 +18,7 @@
 #include "quantum.h"
 #include "report.h"
 #include "timer.h"
-#include "process_key_override_private.h"
+#include "process_key_override.h"
 
 #include <debug.h>
 

@zvecr zvecr added the bug label Aug 1, 2021
@drashna
Copy link
Member Author

drashna commented Aug 1, 2021

I can do so, but is there a specific reason for doing so?

quantum.h contains all of other includes, and this does need a good number of includes.

Also, just this would work too:

#include "process_key_override.h"
#include "quantum.h"

@zvecr
Copy link
Member

zvecr commented Aug 1, 2021

Including the bare minimum is general best practice, and things like quantum.h including the world produces many assumptions that are harder to unpick later. As the consumer of the api, why would you need to care about another enabled feature like maybe audio.

@zvecr zvecr merged commit ebed2e9 into qmk:develop Aug 1, 2021
@drashna drashna deleted the fix/key_overrides branch August 1, 2021 15:54
nhongooi pushed a commit to nhongooi/qmk_firmware that referenced this pull request Dec 5, 2021
* [BUG] Fix Key Override includes

* simplify includes
BorisTestov pushed a commit to BorisTestov/qmk_firmware that referenced this pull request May 23, 2024
* [BUG] Fix Key Override includes

* simplify includes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants